BspCrvCoxDeBoorBasis

Section: C Library Functions (3)
Updated: IRIT Version 6.0
Index Return to Main Contents
 

NAME

BspCrvCoxDeBoorBasis()  

SYNOPSIS

cagd_lib/bspcoxdb.c:115

CagdRType *BspCrvCoxDeBoorBasis(CagdRType *KnotVector,
                                int Order,
                                int Len,
                                CagdRType t,
                                int *IndexFirst)
 

DESCRIPTION

Returns a pointer to a vector of size Order, holding values of the non zero basis functions of a given curve at given parametric location t. This vector SHOULD NOT BE FREED. Although it is dynamically allocated, the returned pointer does not point to the beginning of this memory and it it be maintained by this routine (i.e. it might be freed next time this routine is being called). IndexFirst returns the index of first non zero basis function for the given parameter value t. Uses the recursive Cox de Boor algorithm, to evaluate the Bspline basis functions. Algorithm: Use the following recursion relation with B(i,0) == 1.


          t     -    t(i)            t(i+k)    -   t
 B(i,k) = --------------- B(i,k-1) + --------------- B(i+1,k-1)
          t(i+k-1) - t(i)            t(i+k) - t(i+1)

Starting with constant Bspline (k == 0) only one basis function is non zero and is equal to one. This is the constant Bspline spanning interval t(i)...t(i+1) such that t(i) <= t < t(i+1). We then raise this constant Bspline to the prescribed Order and find in this process all the basis functions that are non zero in t for order Order. Sound simple hah!?  

PARAMETERS:

KnotVector: To evaluate the Bspline Basis functions for this space.

Order: Of the geometry.

Len: Number of control points in the geometry. The length of KnotVector is equal to Len + Order.

t: At which the Bspline basis functions are to be evaluated.

IndexFirst: Index of the first Bspline basis function that might be non zero.  

FUNCTION RETURN VALUE

CagdRType *: A vector of length Order thats holds the values of the Bspline basis functions for the given t. A Bspline of order Order might have at most Order non zero basis functions that will hence start at IndexFirst and upto (*IndexFirst + Order - 1).

 

ORIGIN

(C) Copyright 1989/90-95 Gershon Elber, Technion, IIT


 

Index

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS:
FUNCTION RETURN VALUE
ORIGIN

This document was created by man2html, using the manual pages.
Time: 07:27:15 GMT, October 17, 2022